package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.YundaHefeiDTO;
import com.financing.wap.dao.IYundaHefeiDao;
import com.financing.wap.common.SqlName;
/**
 * yunda_hefei  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("yundaHefeiDao")
public class YundaHefeiDaoImpl extends BaseDaoImpl<YundaHefeiDTO, java.lang.Integer> implements IYundaHefeiDao {


	@Override
	public int insert(YundaHefeiDTO yundaHefei) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.YundaHefeiSql.insert, yundaHefei);
	}

	@Override
	public void update(YundaHefeiDTO yundaHefei) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.YundaHefeiSql.update, yundaHefei);
	}

	@Override
	public void updateForce(YundaHefeiDTO yundaHefei) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.YundaHefeiSql.updateForce, yundaHefei);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.YundaHefeiSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<YundaHefeiDTO> queryList(YundaHefeiDTO yundaHefei) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.YundaHefeiSql.queryList, yundaHefei);
	}

	@Override
	public int queryListCount(YundaHefeiDTO yundaHefei) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.YundaHefeiSql.queryListCount, yundaHefei);
	}

	@Override
	public YundaHefeiDTO loadById(Integer id) throws SQLException {
		return  (YundaHefeiDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.YundaHefeiSql.loadById,id);
	}

	@Override
	public Class<YundaHefeiDTO> getEntityClass() {
		return YundaHefeiDTO.class;
	}
 	
}
